﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MailMenu.aspx.cs" Inherits="UI_Mail_MailMenu" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head runat="server">
    <title></title>
    <link href="../../css/menu.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery.easyui/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
      function resizeIframe(obj) {
        alert(obj.contentWindow.document.body.scrollHeight);
        obj.style.height = obj.contentWindow.document.body.scrollHeight + 10 + 'px';
      }
    </script>
    <script type="text/javascript">
     $(document).ready(function(){
       var orderID = request.QueryString('orderid');
       var eBayUserID = request.QueryString('ebayuserid');
       var page = request.QueryString('page');

       switch (page)
       {
         case 'dispute':
           $('#content').html('<iframe src="./DisputeDetail.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'feedback':
           $('#content').html('<iframe src="./FeedbackDetail.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'summary':
           $('#content').html('<iframe src="./Summary.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:100%;width:100%;position:absolute;"></iframe>');
           break;
         case 'shippment':
           $('#content').html('<iframe src="./Shipment.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'message':
           $('#content').html('<iframe src="./MessageDetail.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'dispute':
           $('#content').html('<iframe src="./DisputeDetail.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'feedback':
           $('#content').html('<iframe src="./FeedbackDetail.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'resend':
           $('#content').html('<iframe src="./Resend.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'refund':
           $('#content').html('<iframe src="./Refund.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
         case 'history':
           $('#content').html('<iframe src="./History.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '" frameborder="0" scrolling="auto" style="overflow:hidden;height:90%;width:100%;position:absolute;"></iframe>');
           break;
       }

       $('#cssmenu>ul>li').click(function(){
         var txt = $(this).text();
         switch(txt) {
           case '摘要':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=summary';
             break;
           case '运输':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=shippment';
             break;
           case '邮件':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=message';
             break;
           case '纠纷':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=dispute';
             break;
           case '评价':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=feedback';
             break;
           case '重发':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=resend';
             break;
           case '退款':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=refund';
             break;
           case '历史':
             window.location.href = './MailMenu.aspx?ebayuserid=' + eBayUserID + '&orderid=' + orderID + '&page=history';
             break;
           default:
             break;
         }
       });
     });
     var request = {
       QueryString : function(val) {
         var url = window.location.search;
         var re = new RegExp('' +val+ '=([^&?]*)', 'ig');
         return ((url.match(re))?(url.match(re)[0].substr(val.length+1)):null);
       }
     };
    </script>
  </head>
  <body style="margin:0px;padding:0px;overflow:hidden">
    <div id="cssmenu">
      <ul>
        <li><a href="#"><span>摘要</span></a></li>
        <li><a href="#"><span>运输</span></a></li>
        <li><a href="#"><span>邮件</span></a></li>
        <li><a href="#"><span>纠纷</span></a></li>
        <li><a href="#"><span>评价</span></a></li>
        <li><a href="#"><span>重发</span></a></li>
        <li><a href="#"><span>退款</span></a></li>
        <li class="last"><a href="#"><span>历史</span></a></li>
      </ul>
    </div>
    <div id="content" style="height:100%;margin-left:auto;margin-right:auto;"></div>
  </body>
</html>







